<!DOCTYPE html>
<html>
   <head>
      <meta charset="UTF-8">
      <title></title>
	
   </head>
   <body>
      <div id="innerHtmlDiv">abc</div>
      <div id="innerTextDiv"></div>
      
	  <script src="js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
     <script type="text/javascript">
		  /* 加载事件onload,在页面加载完了之后被触发 */
		  /* window.onload = function() {
			  var innerHtmlDiv = document.getElementById("innerHtmlDiv");
			  var innerTextDiv = document.getElementById("innerTextDiv");
			  console.log(innerHtmlDiv.innerHTML);
			  innerHtmlDiv.innerHTML = "<span style='color:red'>innerHtml</span>";
			  innerTextDiv.innerText = "<span style='color:red'>innerText</span>";
		  } */
		  
		  $(function() {
			  $("#innerHtmlDiv").html("<span style='color:red'>innerHtml</span>");
			  $("#innerTextDiv").text("<span style='color:red'>innerText</span>");
		  });
		  
     </script>
   </body>

</html>
